<!DOCTYPE html>
<html>

<head>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  <meta name="referrer" content="never">
</head>

<body style="margin: 0px;">
  <div>
    <!-- 背景图片 -->
    <!-- <img id="bg_image" height="100%" width="100%" src="https://api.btstu.cn/sjbz/api.php?format=images&lx=meizi" /> -->

    <!-- 背景视频 -->
    <video id="bg_video" muted="muted" width="100%" height="100%" src="" autoplay="autoplay" loop></video>



    <!-- 
    https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fpic1.win4000.com%2Fwallpaper%2Fb%2F53a128e82bae4.jpg&refer=http%3A%2F%2Fpic1.win4000.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=auto?sec=1653975706&t=99eb290a0121461dadc9f6e60a7516a1
    https://pic.netbian.com/uploads/allimg/220327/000925-16483109652987.jpg
    
    随机图片地址：
      https://img.paulzzh.tech/touhou/random
      https://api.dujin.org/pic/
      https://api.dujin.org/pic/fengjing
      https://api.btstu.cn/sjbz/?lx=meizi
      https://api.btstu.cn/sjbz/api.php?format=images&lx=meizi
      https://bing.ioliu.cn/v1/rand  (太慢)
      https://bing.ioliu.cn/v1/rand?w=1920&h=1200(太慢)
      https://tuapi.eees.cc/api.php?category=meinv&type=302
      https://tu.ltyuanfang.cn/api/fengjing.php
      https://source.unsplash.com/random/1980x1280
      https://bak.yantuz.cn:8000/mmPic/
    二次元随机图:
      http://www.dmoe.cc/random.php  
      https://img.paulzzh.com/touhou/random
      https://api.ixiaowai.cn/api/api.php（二次元动漫）
      https://api.ixiaowai.cn/mcapi/mcapi.php（mc酱动漫）
      https://api.ixiaowai.cn/gqapi/gqapi.php（高清壁纸）
      https://api.mtyqx.cn/api/random.php（二次元动漫）
      https://api.mtyqx.cn/tapi/random.php（二次元动漫）
   -->
    <script src="./js/jquery.min.js"></script>
    <script language="javascript">
      $(function () {
        //var bg_videos = ['大海', '鲸落', '落叶', '森林', '小鸟', '笑脸', '樱花'];
        var rand = parseInt(Math.random() * 7);
        //$('#bg_video').attr('src', './video/' + bg_videos[rand] + '.mp4');

		// 随机视频 http://api.yujn.cn/api/zzxjj.php?type=video    
		var video_src = ['https://api.kuleu.com/api/MP4_xiaojiejie?type=video',
						 'https://api.kuleu.com/api/xjj?type=video',
						 'http://api.yujn.cn/api/zzxjj.php?type=video ',
						 'https://ijsnbdd.hxwun8.xyz/uploads/2024-10-29/7465825/e15d196de7e0e2d2ae274a3d26dacf76_wm.mp4',
						 'https://ijsnbdd.hxwun8.xyz/uploads/2024-10-30/25162585/e15878e32b2a337e85a25baecd76bada_wm.mp4',
						 'https://ijsnbdd.hxwun8.xyz/uploads/2024-10-30/25162585/ad122cccb2f1bd0e05d0ed43f1cf2a30_wm.mp4',
						 'https://ijsnbdd.hxwun8.xyz/uploads/2024-10-30/104332804/bd18da8269710e6e7f4abd2ffd53b804_wm.mp4']
		$('#bg_video').attr('src', video_src[rand]);
        /* if (rand == 6 || rand == 7) {
          $('#bg_video').css('display', 'none');
          $('#bg_image').css('display', '');
        } else {
          $('#bg_image').css('display', 'none');
        } */
      });
    </script>
	<!-- <script>
		// 定义 API URL
		const apiUrl = 'https://api.yujn.cn/api/kuaimao.php?type=json';
		// 使用 Fetch API 获取数据
		fetch(apiUrl)
			.then(response => {
				if (!response.ok) {
					throw new Error('网络错误');
				}
				return response.json();
			})
			.then(data => {
				// 检查返回的代码
				if (data.code === 200) {
					// 获取视频链接
					const videoUrl = data.video;
					// 设置 video 标签的 source
					const videoSource = document.getElementById('video_source');
					videoSource.src = videoUrl;
					// 重新加载视频
					const videoElement = document.getElementById('bg_video');
					videoElement.load();
				} else {
					console.error('错误代码:', data.code);
				}
			})
			.catch(error => {
				console.error('获取数据失败:', error);
			});
	</script> -->
  </div>
</body>

</html>